﻿@model WhereAmiMvc.Entities.EmployeesOfLocation

@{
    ViewBag.Title = "编辑员工信息";
}

<h2>编辑员工信息</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        <h4>员工信息</h4>
        <hr/>
        <fieldset>
            @Html.ValidationSummary(true, "", new {@class = "text-danger"})
            <div class="form-group">
                @Html.LabelFor(model => model.IdEmployee, htmlAttributes: new {@class = "control-label col-md-2"})
                <div class="col-md-10">
                    @Html.EditorFor(model => model.IdEmployee, new {htmlAttributes = new {@class = "form-control", @disabled = ""}})
                    @Html.ValidationMessageFor(model => model.IdEmployee, "", new {@class = "text-danger"})
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.FullName, htmlAttributes: new {@class = "control-label col-md-2"})
                <div class="col-md-10">
                    @Html.EditorFor(model => model.FullName, new {htmlAttributes = new {@class = "form-control"}})
                    @Html.ValidationMessageFor(model => model.FullName, "", new {@class = "text-danger"})
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.SimplePinyin, htmlAttributes: new {@class = "control-label col-md-2"})
                <div class="col-md-10">
                    @Html.EditorFor(model => model.SimplePinyin, new {htmlAttributes = new {@class = "form-control"}})
                    @Html.ValidationMessageFor(model => model.SimplePinyin, "", new {@class = "text-danger"})
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.DeptName, htmlAttributes: new {@class = "control-label col-md-2"})
                <div class="col-md-10">
                    @Html.DropDownListFor(model => model.DeptName, ViewBag.LocationList as SelectList, "--选择部门--", new {@class = "form-control"})
                    @Html.ValidationMessageFor(model => model.DeptName, "", new {@class = "text-danger"})
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-offset-2 col-md-10">
                    <input type="submit" value="保存" class="btn btn-primary"/>
                </div>
            </div>
        </fieldset>
    </div>
}

<div>
    @Html.ActionLink("返回列表", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}